/**
 *
 */
package com.naiterui.ehp.bs.emr.utils;

import com.naiterui.ehp.bp.constants.CommonConstant;
import com.naiterui.ehp.bs.emr.entity.mongo.MDrink;
import com.naiterui.ehp.bs.emr.entity.mongo.MSmoke;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/**
 * 系统公共常量
 *
 * @since 2.18
 */
public class Constants {
    /**
     * 病例状态-草稿
     */
    public static final int CASE_STATUS_DRAFT = 1;

    /**
     * 病例状态-已完成
     */
    public static final int CASE_STATUS_FINISH = 0;
    /**
     * 病历例状态-暂存
     */
    public static final int CASE_STATUS_TEMPORARY = 2;

    /**
     * 填写来源：1-医生邀请填写；
     */
    public static final int CASE_SOURCE_ASK = 1;
    /**
     * 填写来源：2-自己添加
     */
    public static final int CASE_SOURCE_SELF = 2;
    /**
     * 填写来源：3:医生推送
     */
    public static final int CASE_SOURCE_DOCTOR = 3;
    /**
     * 填写来源：4线上诊室病历
     */
    public static final int CASE_SOURCE_CONSULTROOM = 4;

    /**
     * 填写来源：5患者填写量表
     */
    public static final int CASE_SOURCE_SCALE = 5;

    /**
     * IM返回是否需要支付：1-发送成功；0-需要支付
     */
    public static final int IM_RET_NEEDPAY = 0;

    /**
     * 医生填写图片
     */
    public static final int RECORD_TYPE = 1;
    /**
     * 患者病历图片
     */
    public static final int RECORD_PATIENT_TYPE = 2;

    /**
     * 患者首聊：医生已填写病历
     */
    public static final int PATIENT_CONSULT_TYPE_MEDICATRECORD = 1;
    /**
     * 患者首聊：患者填写病情描述
     */
    public static final int PATIENT_CONSULT_TYPE_DISEASE = 2;

    /**
     * 吸烟情况对照关系
     */
    public static final Map<Integer, String> SMOKE_MAP = Collections.unmodifiableMap(new HashMap<Integer, String>() {
        private static final long serialVersionUID = 1988550114895852095L;

        {
            put(MSmoke.SMOKE_STATUS_QUIT, "已戒烟");
            put(MSmoke.SMOKE_STATUS_YES, "吸烟");
            put(MSmoke.SMOKE_STATUS_NO, "从未吸烟");
        }
    });

    /**
     * 饮酒情况对照关系
     */
    public static final Map<Integer, String> DRINK_FREQUENCY_MAP = Collections.unmodifiableMap(new HashMap<Integer, String>() {
        private static final long serialVersionUID = -2997110527782839735L;

        {
            put(MDrink.DRINK_FREQUENCY_NO, "从不");
            put(MDrink.DRINK_STATUS_SOMETIME, "偶尔");
            put(MDrink.DRINK_STATUS_OFTEN, "经常");
            put(MDrink.DRINK_STATUS_EVERYDAY, "每天");
        }
    });

    public static final Map<Integer, String> DRINK_STATUS_MAP = Collections.unmodifiableMap(new HashMap<Integer, String>() {
        private static final long serialVersionUID = -2394011861234697842L;

        {
            put(MDrink.DRINK_STATUS_YES, "未戒酒");
            put(MDrink.DRINK_STATUS_NO, "已戒酒");
        }
    });


    /**
     * 病例签名开关控制
     */
    public static final String EMR_SIGN_SWITCH_KEY = CommonConstant.REDIS_PRE_EMR + "sign_switch_key";

    /**
     * 患者及家庭成员健康档案缓存键
     */
    public static final String HEALTH_RECORD_CACHE_KEY = CommonConstant.REDIS_PRE_EMR + "health_record_cache_key_";

    public static final String PATIENT_DISEASE_IMG_SN = CommonConstant.REDIS_PRE_PT + "disease_img_sn";
}
